package s14.ch17.ex1;

import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.net.InetAddress;
import java.net.Socket;
import java.net.UnknownHostException;

public class MyClient {

	public static void main(String[] args) throws UnknownHostException,
			IOException {
		Socket client = null;
		int portNumber = 1234;
		client = new Socket(InetAddress.getLocalHost(), portNumber);
		OutputStream outputStream = client.getOutputStream();
		PrintWriter pw = new PrintWriter(outputStream, true);
		String message="hello world done";
		pw.println(message);
		client.close();
		outputStream.close();
		

	}

}
